Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore commits inadvertently lost #44

Merged
merged 5 commits into from
Oct 30, 2024
Merged

Restore commits inadvertently lost #44

merged 5 commits into from
Oct 30, 2024

Conversation

ThinkOpenly
Copy link
Owner

5 commits were lost, likely associated with commit dd893a6.

Restore these commits.

Instructions with fewer than two inputs were missing their names and descriptions in the JSON output.

```
union clause ast = C_J : (bits(11))
```
```
union clause ast = EBREAK : unit
```

By moving the code blocks responsible for parsing and extracting names and descriptions from the tuple match block, all instructions now have their names and descriptions correctly extracted.
This change ensures that when both AST and mnemonic are annoted for an instruction, the parser will prioritize the mnemonic as the key to retrieve the name from the Hashtbl.
If the mnemonic is missing, the parser will fall back to using the AST as the default key.
This change adds four missing identity functions to the identity_funcs list.
These omissions caused certain operands to be incorrectly rendered in the
syntax field of the JSON output.

This update resolves those problems and helps prevent other potential errors
in the JSON generation process.
Update json_of_syntax to handle optional operands and trim constants.
Previously, optional operands were displayed inline with other operands,
causing ambiguity in the syntax.
```
vd,vs2,vs1vm
```

Optional operands are now enclosed in square brackets for clarity.
```
vd,vs2,vs1[,vm]
```

Operands containing constants such as `hex_bits_8(uimm,0b000)` were included
in the syntax output as:
```
rdc,rsc,uimm,0b000
```

Constants are now trimmed resulting in a more readable output:
```
rd,rsc,uimm
```
Operands with constants `(uimm,0b000)` were previously split and the constant
discarded. While this did not cause errors, the change now cross-checks both
parts to an `inputl` list before retaining the relevant components.
This ensures accuracy and robustness.
@ThinkOpenly ThinkOpenly merged commit 0afe610 into json Oct 30, 2024
6 checks passed
@ThinkOpenly ThinkOpenly deleted the restore branch October 30, 2024 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants